﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity.ModelConfiguration;
using System.ComponentModel.DataAnnotations;
using TestRootBaseData.Service.Model;


namespace TestRootBaseData.Service.Model.ModelConfiguration
{
    class PersonConfiguration
    : EntityTypeConfiguration<Person>
    {

        public PersonConfiguration()
        {

         
             HasKey(c => c.EntityId)                
            .Property(c => c.EntityId)
            .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            //.HasColumnName("ClientID")
            //.HasColumnType("bigint")
            //.IsRequired()
             
             ToTable("Person");
            
            ////Relationship Mappings
            //HasMany(a => a.Compounds)
            //  .WithMany(b => b.Samples)
            //  .Map((mc) =>
            //{
            //    mc.MapLeftKey("SaplingID");
            //    mc.MapRightKey("CompoundId");
            //    mc.ToTable("SamplingCompound");
            //});
}
    }
}

